package com.geektime.hello;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.UUID;

public class UUIDDemo {
    public static void main(String[] args) {
        String jdkUUID = UUID.randomUUID().toString();
        String hutoolUUID = cn.hutool.core.lang.UUID.randomUUID().toString();

        System.out.println("jdkUUID = " + jdkUUID);
        System.out.println("hutoolUUID = " + hutoolUUID);

        String result = HttpRequest.get("ahtv-obs.obs.cn-north-4.myhuaweicloud.com/output/moderation/video/tasku8v8oujw.json")
                .execute().body();
        System.out.println("result = " + result);


        String url = "ahtv-obs.obs.cn-north-4.myhuaweicloud.com/output/moderation/video/tasku8v8oujw.json";
        JSONObject resultJson = JSON.parseObject(HttpUtil.get(url));
        //    review：建议人工复查。
        //    block：建议封禁。
        //    pass：通过。
        String suggestion = resultJson.getJSONObject("result").getString("suggestion");
    }
}
